//
//  Book.m
//  作业3
//
//  Created by dllo on 16/7/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "Book.h"

@implementation Book
- (instancetype)initWithBookName:(NSString *)bookName
                           price:(CGFloat)price {
    self = [super init];
    if (self) {
        _bookName = bookName;
        _price = price;
    }
    return self;
}

+ (instancetype)bookWithBookName:(NSString *)bookName
                           price:(CGFloat)price {
    return [[[Book alloc] initWithBookName:bookName price:price] autorelease];
}
@end
